import request from '../util/request'

// 查询省份
export function getProvince (data) {
  return request({
    url: '/hospital-system/address/list-province',
    method: 'get'
  })
}

// 查询市
export function getCity (data) {
  return request({
    url: '/hospital-system/address/list-city',
    method: 'post',
    data: {
      province: data.province
    }
  })
}

// 查询区
export function getArea (data) {
  return request({
    url: '/hospital-system/address/list-area',
    method: 'post',
    data: {
      province: data.province,
      city: data.city
    }
  })
}

// 查询街道
export function getTown (data) {
  return request({
    url: '/hospital-system/address/list-town',
    method: 'post',
    data: {
      province: data.province,
      city: data.city,
      area: data.area
    }
  })
}
